<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/**
			 * 简单数据响应
			 */
			var data = {a:1,b:2}
			var proxy = new Proxy(data,{
				get:function(data,key){
					if(key in data){
						return data[key]
					}else{
						console.warn(`${key} is undefined`)
						return data[key]
					}
				},
				set:function(data,key,value){
					if(typeof data == 'object'){
						data[key] = value
						console.log('渲染..');
					}
					return true
				}
			})
			console.log(proxy.a);
			proxy.c=12
			proxy.d=12
			console.log(proxy);
		</script>
	</body>
</html>
